/******************************************************************************
*@file  : main.c
*@brief : This file provides UART Demos
*@ver   : 1.0.0
*@date  : 2022.10.20
******************************************************************************/

#include "app.h"

void OS_EnterCritical(void)
{
    __set_FAULTMASK(1);
}

void OS_ExitCritical(void)
{
    __set_FAULTMASK(0);
}

int main(void)
{
    HAL_Init();      
    SystemClock_Config(SYSCLK_180M_SRC_RC64M, RCC_PCLK1_DIV_1, RCC_PCLK2_DIV_1);    
    HAL_Init_Ex();   
    
    BSP_UART_Init(UART1); 

    BSP_PB_Init();

    printfS("--------------------------------------------------------------------\r\n");
    
    printfS("UART PINs selected:\r\n");
    printfS("UART1 TXD:PA14, RXD:PA15\r\n");
    printfS("UART2 TXD:PB2 , RXD:PB3\r\n");
    printfS("Modify HAL_UART_MspInit() function in user code if you select other UART PINs\r\n\r\n");
    
    printfS("UART configuration:\r\n");
    printfS("%d, 8-N-1\r\n\r\n", 115200);
        
    APP_AES_Rom_Test();
    
    while(1)
    {
        
    }

}
